<?php
    include('./conn.php');

    $username=$_REQUEST['username'];
    $email=$_REQUEST['email'];
    $phone=$_REQUEST['phone'];

    $sql="SELECT * FROM `users` WHERE `username` = '$username' AND `email` = '$email' AND `phone` = '$phone'";

    $result=$mysqli->query($sql);

    $name=['hasuser'=>true,'msg'=>$username];

    $json=json_encode($name);

    if($result->num_rows>0){
        echo $json;
    }else{
        echo '{"hasuser":false}';
    }
?>